/***************************************************************************
 *   Copyright (C) 2005 by xihe   *
 *   xihels@163.com                                                        *
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 *   This program is distributed in the hope that it will be useful,       *
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
 *   GNU General Public License for more details.                          *
 *                                                                         *
 *   You should have received a copy of the GNU General Public License     *
 *   along with this program; if not, write to the                         *
 *   Free Software Foundation, Inc.,                                       *
 *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
 ***************************************************************************/
#ifndef _GET_CLUSTER_MEMBER_INFO_REPLY_H_
#define _GET_CLUSTER_MEMBER_INFO_REPLY_H_

#include "ClusterOperateReply.h"
#include "QQBuddy.h"
#include <vector>
using std::vector;

/**
 * 请求成员信息的回复包，格式为
 * 1. 头部
 * 2. 命令类型，1字节，请求成员信息是0x0C
 * 3. 回复码，1字节，成功是0x0
 * 4. 群内部ID，4字节
 * 5. 成员QQ号，4字节
 * 6. 未知，1字节
 * 7. 头像号，1字节
 * 8. 年龄，1字节
 * 9. 性别，1字节
 * 10. 昵称长度，1字节
 * 11. 昵称
 * 12. 未知的2字节
 * 13. 扩展标志，1字节
 * 14. 通用标志，1字节
 * 15. 如果有更多成员，重复5-14部分，5－14部分其实也就是QQFriend结构
 * 16. 尾部
 */

class GetClusterMemberInfoReplyPacket : public ClusterOperateReply {
    protected:
	GetClusterMemberInfoReplyPacket(const uint8_t* buf, int len);
    public:
	typedef vector<QQBuddy> Members;
	uint32_t getUid() const { return clusterId; }
	const Members& getMembers() const { return members; }
    private:
	Members  members;
	uint32_t clusterId;
};
/**
 * 得到在线成员的回复包，格式为：
 * 1. 头部
 * 2. 命令类型，1字节，请求成员信息是0x0B
 * 3. 回复码，1字节，成功是0x0
 * 4. 群内部ID，4字节
 * 5. 未知字节，0x3C
 * 6. 在线成员的qq号
 * 7. 如果有更多在线成员，重复6
 * 8. 尾部
 */


class GetClusterOnlineMemberReplyPacket : public ClusterOperateReply {
    protected:
	GetClusterOnlineMemberReplyPacket(const uint8_t* buf, int len) ;
    public:
	typedef vector<uint32_t> Members;
	uint32_t getUid() const { return clusterId; }
	const Members& getMembers() const { return members; }
    private:
	Members  members;
	uint32_t clusterId;
};


#endif // _GET_CLUSTER_MEMBER_INFO_REPLY_H_


